This invention relates to a method and apparatus for generating a chrominance keying signal and shaped fill video.
In a three-port video mixer two full field video signals may be combined on the basis of a key control signal that is associated with one of the video signals, typically referred to as the foreground signal, to provide a program signal. The key signal has a value of one for points of the output image that are to be occupied by the foreground image, a value of zero for points of the output image that are to be occupied by the background image and values between one and zero for points of the output image that are to be occupied by a mix between the foreground image and the background image.
A chroma key apparatus derives a key control signal from a video signal based on the hue of the image represented by that signal. One common application of a chroma key apparatus is in a news broadcast, in which the newscaster appears in the program image against a studio background. Generally, this program image is composed from a foreground image of the newscaster against a compositing screen that is of a selected hue, typically blue or green, and a background image of a studio. A key control signal is derived from the foreground video signal based on the hue of the foreground image: the key control signal has the value zero for points of the field that have the selected hue and has the value one elsewhere. When the foreground and background video signals are combined in a video mixer, the studio background appears in the program image at points for which the foreground image has the selected hue, and the foreground image appears elsewhere.
FIG. 1 is a simplified block diagram illustrating how a chroma key generation circuit operates with a mixer and a summation circuit to combine foreground and background video signals. A chroma key generation circuit receives a foreground video signal and produces a chroma key signal and a shaped video output. The shaped video output is the foreground image "cut out" and appearing against a black background, while the chroma key signal is a control signal that operates to control the mixing of the background video with zero in a three-port mixer that operates in accordance with the standard mix equation: EQU Output=X*Y+(1-X)*Z (1)
The output of the three-port mixer is the background video signal with a hole "cut" into it where the shaped video will go. The summation circuit combines the shaped (foreground) video signal and the cut-out background video signal. The result is a full field video signal in which an object or person in the foreground signal appears against the, background.
FIGS. 2A and 2B are a block diagram of a conventional (prior art) chroma keying circuit suitable for use with composite video signals. A matrix 2 receives RGB (red, green and blue) color component inputs and from them produces two color difference signals, C.sub.R and C.sub.B, and a luminance signal Y. Alternatively, if color difference signals and a luminance signal are already available, the matrix could be replaced by scaling circuits to ensure that those signals were of the expected input amplitude.
The color difference signals, C.sub.R and C.sub.B, are applied to two inputs of a hue correlation circuit 4. Taken together these two color difference C.sub.R and C.sub.B define a hue angle .THETA., since the hue of an image represented by a video signal can be expressed in terms of the angle .THETA. whose tangent is equal to the ratio of the color difference components: EQU .THETA.=arctan(C.sub.R /C.sub.B) (2)
Other inputs to the hue correlation circuit 4 define a reference hue .alpha., via sin .alpha. and cos .alpha. settings of ganged potentiometers 3a and 3b, respectively. Ideally, the compositing screen is uniform in hue and the reference hue .alpha. is precisely equal to the hue of the compositing screen .THETA.. However, to accommodate the minor variations in hue that tend to occur in the real world, the selectivity control 5 defines a range 2 delta.alpha. of hues that is sufficient to encompass the normal variations in hue.
The image hue .THETA. is compared with the reference hue .alpha. in hue correlation circuit 4. If the color difference components received by the hue correlation circuit 4 define a hue that is within the range .alpha..+-. delta.alpha. established by the reference hue and selectivity control, the hue correlation circuit 4 provides a positive output; otherwise it provides a negative output. The output of the hue correlation circuit 4, HCC.sub.out, is: EQU HCC.sub.out =C.sub.mag *cos(.THETA.-.alpha.)-C.sub.mag *SEL*.vertline.sin(.THETA.-.alpha.).vertline. (3)
where
C.sub.mag is the chrominance magnitude and PA1 SEL is a function of delta.alpha..
Equation (3) has a positive value when the input hue is close to the reference hue, within the selectivity value, SEL. Positive NAM (non-additive mixer) 6 has the output of the hue correlation circuit 4, HCC.sub.out, as one input, and a "0" as its other input. The positive NAM 6 functions to remove all negative values, thereby limiting the signal to non-negative values. The negative values correspond to foreground signals, while the non-negative values correspond to the range of expected background hues.
Although the background hue is chosen to avoid colors in the foreground, it nonetheless sometimes occurs that the foreground signal also contains hues that are within the range of reference background hues. This can occur, for instance, when the background hue is blue and a person in the foreground has a blue tie or blue eyes. To eliminate the undesirable effects that this would create, a forced foreground mask generator 10 supplies a mask signal to mixer 8 that is normally high, but becomes zero in regions to be masked. The mask signal controls the output of mixer 8 according to equation (1), with Z=0, to force the mixer 8 output to zero in those regions where background should not be present.
Thus, the output of the mixer 8 is positive in those regions of the image that are in the background. The output of mixer 8 is used to control mixer 12, according to equation (1), again with Z=0, so that it produces its Y input as its output in those regions where the output of mixer 8 is high, i.e., background. The Y input to mixer 12 is the output of matte generator 14. The operator selects background suppression values that determine the output of the matte generator 14 by observing how well it cancels out the reference hue to produce a suitable background on the screen. The resulting shaped matte signal output of mixer 12 is subtracted by summation circuit 16 from a composite video signal that has been suitably delayed by delay element 18. The output of summation circuit 16 is constrained in the values that it may assume by limiter 20. When the matte generator 14 is properly set up, the output of limiter 20 is the foreground fill over black, or a "shaped fill" video output.
The shaped fill video output is ready to be mixed with a new background video signal according to a chroma key signal that, in effect, "cuts a hole" in the new background signal. The output of mixer 8 is a version of the final chroma key signal, but it is desirable to modify it further for shadow control. To provide operator control over the shadows that the foreground images cast on the new background, the old shadows are removed from the keying signal and a controlled shadow is added back in.
The luminance output, Y, of matrix 2 is suitably delayed by delay element 22 and applied to the input of variable gain shadow comparator (VGC) 24. The shadow clip input to the variable gain shadow comparator 24 from potentiometer 25a is adjusted to extract the shadow information from the delayed luminance signal. The shadow gain control is adjusted via potentiometer 25b to determine how much shadow is to be added back into the key control signal. The output of all VGCs is limited to the system's maximum control level.
The variable gain key comparator (VGC) 26 receives the output of mixer 8, which contains the natural shadow, as illustrated in waveform A. The clipping of the key signal is determined by the setting of key clip potentiometer 27a, while the key gain is determined by the setting of key gain potentiometer 27b. The output of variable gain key comparator 26 has shadow information eliminated, as shown in waveform B. The output of the variable gain key comparator 26 is applied to one input of positive NAM 28, while the output of variable gain shadow comparator 24 is applied to the other. The positive NAM 28 combines these inputs into the key control signal shown in waveform C, a key signal with adjustable gain and adjustable shadow control.
FIGS. 3A and 3B are a block diagram of a conventional (prior art) chroma keying circuit that performs the same function as the circuit shown in FIG. 2, except that it is suitable for use with component video signals. RGB color component inputs are converted by matrix 2 into two color difference signals, C.sub.R and C.sub.B, and a luminance signal, Y. As before, the two color difference signals are inputs to a hue correlation circuit 4 whose output is shown in equation (3). The positive NAM 6, forced foreground mask generator 10, mixer 8, variable gain key comparator 26, delay element 22, variable gain shadow comparator 24 and positive NAM 28 all operate in the same manner as has been previously described in connection with FIG. 2. Note that the content of waveforms A, B and C in FIGS. 3A and 3B are is the same as their content in FIGS. 2A and 2B.
The main difference between the keyer circuit shown in FIGS. 3A and 3B and that shown in FIGS. 2A and 2B is that in FIG. 3A mixers 12a, 12b and 12c have replaced matte generator 14 and mixer 12, and summation circuits 16a, 16b and 16c have replaced summation circuit 16, so that the luminance constant, determined by potentiometer 11a, and two color difference constants, determined by potentiometers 11b and 11c, are now individually mixed with a Z=0 input in mixers 12a, 12b and 12c under the control of the output of mixer 8. The outputs of mixers 12a, 12b and 12c are subtracted from the corresponding component signals by summation circuits 16a, 16b and 16c after those separate component signals have been appropriately delayed by delay elements 18a, 18b and 18c. Limiter 20 has been replaced by peak and black limiter 20a on the luminance channel and .+-. peak limiters 20b and 20c on the color difference channels. Despite these implementation differences that are required by the separate component signals, the functional effect is identical and the three component outputs are again a "shaped fill" output.
The chroma key apparatuses shown in FIGS. 2A, 2B and 3A, 3B have ten operator controls. It is not easy for the operator to adjust these ten controls to produce a satisfactory instrument set-up, particularly because adjustments are made subjectively while observing the result on a monitor and because the controls are not independent of one another. The operator of a chroma key apparatus must therefore develop skill and understanding of how the chroma key apparatus works, and even then it can still take considerable time to achieve a satisfactory setup.
U.S. Pat. No. 4,413,273 to Wischermann for "System for Mixing Two Color Television Signals" discloses a method for generating key control signals utilizing the luminance and color of the foreground image at a reference point selected by the operator. U.S. Pat. No. 4,667,221 to Cawley et al for a "Video Editing System with Allowable Range for Key Signal Set By Detecting the Range in a Selected Area" discloses a system in which a range of key colors is determined by the extremes of color that are present in an area defined by the operator.